Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

EOColumnAssociation 

Inherits From:	EOAssociation : NSObject

Conforms To:	EOAssociationNotification (EOAssociation)

Declared In:	eointerface/EOColumnAssociation.h

Class Description

An EOColumnAssociation displays and edits a column of an NXTableView containing the values for its key of all enterprise objects in its controller. You can hook up any number of column associations to a single NXTableView, as long as they all have the same controller.

However, because an NXTableView expects to have only a single object acting as its data source (not to be confused with the controller's data source), one of the column associations must step forward to play that role. The column associations for a particular controller and NXTableView know to rendezvous under this lead association, which uses itself and its cohorts as column identifiers and forwards requests for data access to the appropriate association.

Although the interface of any association contains only a few methods, various implementations are often highly dependent on one another and on the way the destination objects act. Because of this, if you need to create an association class for a custom subclass of NXTableVector, you should create it as an immediate subclass of EOAssociation.

Edit Buffering

Because an NXTableView doesn't store data on its own, EOColumnAssociations have to cache their edited values (in other words, buffered edits not yet sent to the controller). When asked to get a value for a particular index, the association asks its controller for the enterprise object at that index and looks for a value cached under that object. Only if it doesn't find one does it ask the enterprise object for its value. When the controller saves to objects, all of its column associations (and any other associations that buffer edits) are sent discardEdits messages telling them to purge their cached values.

Setting up an EOColumnAssociation

When setting up an EOColumnAssociation programmatically, you must configure the newly initialized association by sending it a setTableView: message with the NXTableView of the destination column as an argument. This method sets the association up as the NXTableView's data source and delegate if needed. See the method description for more information.

Instance Variables

None declared in this class.

Instance Methods

setTableView:

- (void)setTableView:(NXTableView *)aTableView 

If aTableView doesn't already have a column association from the same controller as its data source, sets up the receiver as the data source and delegate, so that it acts on behalf of all other column associations tied to aTableView. You should always send this message to a column association that you create programmatically.

tableView

- (NXTableView *)tableView 

Returns the NXTableView containing the destination column of the association.